//
//  Button + Extention.swift
//  HJWeiBo
//
//  Created by 黄珏 on 15/11/1.
//  Copyright © 2015年 黄珏. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(title: String,fontSize: CGFloat,textColor: UIColor,imageName: String) {
        self.init()
        setBackgroundImage(UIImage(named: "timeline_card_middle_background"), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: "timeline_card_middle_background_highlighted"), forState: UIControlState.Highlighted)
        setTitle(title, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
        titleLabel?.textColor = textColor
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
    }
}
